package com.demo.array;
/*
数组
数据类型[] 变量名 = new 数组类型[数组长度];
 */
public class Test02 {
    public static void main(String[] args) {
        int[] arr = new int[5];
        // 查 arr[索引]
        System.out.println(arr[0]);
        System.out.println(arr[1]);
        System.out.println(arr[2]);
        System.out.println(arr[3]);
        System.out.println(arr[4]);
        System.out.println("--------");
        // 增
        arr[0] = 11;
        arr[1] = 22;
        arr[2] = 33;
        arr[3] = 44;
        arr[4] = 55;
        System.out.println(arr[0]);
        System.out.println(arr[1]);
        System.out.println(arr[2]);
        System.out.println(arr[3]);
        System.out.println(arr[4]);
        System.out.println("--------");
        //改
        arr[0] = 1;
        arr[1] = 2;
        arr[2] = 3;
        arr[3] = 4;
        arr[4] = 5;
        System.out.println(arr[0]);
        System.out.println(arr[1]);
        System.out.println(arr[2]);
        System.out.println(arr[3]);
        System.out.println(arr[4]);
        System.out.println("--------");
        // 删
        arr[0] = 0;
        System.out.println(arr[0]);
        char[] carr = new char[10];
        System.out.println(carr);

    }
}
